cmake_minimum_required(VERSION 3.14)

project(client-demo VERSION 1.0 LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include_directories(/usr/local/libtriton-client/cc-clients/include)
# include_directories(/usr/local/include/triton-client/)

# Use C++17 standard as Triton's minimum required.
set(TRITON_MIN_CXX_STANDARD 17 CACHE STRING "The minimum C++ standard which features are requested to build this target.")

option(TRITON_ENABLE_CC_HTTP "Build C++ HTTP client libraries" ON)
if(TRITON_ENABLE_CC_HTTP)
  find_package(CURL REQUIRED)
  message(STATUS "Using curl ${CURL_VERSION}")
endif() # TRITON_ENABLE_CC_HTTP

pkg_check_modules(opencv REQUIRED IMPORTED_TARGET opencv4)

find_package(PkgConfig REQUIRED)
# find_package(OpenCV REQUIRED core imgproc features2d)

set(PROJECT_SOURCES
  main.cpp
  imageembedder.h
  imageembedder.cpp
  textembedder.h
  textembedder.cpp
  llm.h
  llm.cpp
)

add_executable(client-demo ${PROJECT_SOURCES})

target_link_libraries(client-demo PRIVATE
    ${OpenCV_LIBS}
    # /usr/local/lib/triton-client/libhttpclient.so
    /usr/local/libtriton-client/cc-clients/lib/libhttpclient.so
    PkgConfig::opencv
)

# install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
